/bin/bash

# mysql
docker run \
  -v /home/ruidong/shenglaotuan/mysql/conf:/etc/mysql \
  -v /home/ruidong/shenglaotuan/mysql/logs:/var/log/mysql \
  -v /home/ruidong/shenglaotuan/mysql/data:/var/lib/mysql \
  -p 3306:3306 \
  --name shenglaotuan-mysql \
  -e MYSQL_ROOT_PASSWORD=123456 \
  -d mysql:5.7

# redis redis.conf是没有的，需要去官网下
# -d redis redis-server /etc/redis/redis.conf --appendonly yes
docker run \
-p 6379:6379 \
  --name shenglaotuan-redis \
  -v /home/ruidong/shenglaotuan/redis/redis.conf:/etc/redis.conf \
  -v /home/ruidong/shenglaotuan/redis/data:/data \
  -d redis redis-server --appendonly yes

# nginx
docker run \
  -p 80:80 \
  --name shenglaotuan-nginx \
  -v /home/ruidong/shenglaotuan/nginx/www:/usr/share/nginx/html \
  -v /home/ruidong/shenglaotuan/nginx/conf/nginx.conf:/etc/nginx/ \
  -v /home/ruidong/shenglaotuan/nginx/logs:/var/log/nginx \
  -d nginx

# java
docker run \
  -p 8080:8080 \
  -d shenglaotuan